3.146 \(\int \sqrt{f+g x} (a+b \log (c (d+e x)^n))^2 \, dx\)

Optimal. Leaf size=510 \[ \frac{8 b^2 n^2 (e f-d g)^{3/2} \text{PolyLog}\left (2,1-\frac{2}{1-\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}}\right )}{3 e^{3/2} g}+\frac{8 b n (e f-d g)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^{3/2} g}-\frac{8 b n (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}-\frac{8 b n \sqrt{f+g x} (e f-d g) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e g}+\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac{8 b^2 n^2 (e f-d g)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )^2}{3 e^{3/2} g}-\frac{64 b^2 n^2 (e f-d g)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )}{9 e^{3/2} g}+\frac{16 b^2 n^2 (e f-d g)^{3/2} \log \left (\frac{2}{1-\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}}\right ) \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )}{3 e^{3/2} g}+\frac{64 b^2 n^2 \sqrt{f+g x} (e f-d g)}{9 e g}+\frac{16 b^2 n^2 (f+g x)^{3/2}}{27 g} \]

[Out]

(64*b^2*(e*f - d*g)*n^2*Sqrt[f + g*x])/(9*e*g) + (16*b^2*n^2*(f + g*x)^(3/2))/(27*g) - (64*b^2*(e*f - d*g)^(3/
2)*n^2*ArcTanh[(Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g]])/(9*e^(3/2)*g) - (8*b^2*(e*f - d*g)^(3/2)*n^2*ArcTanh[
(Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g]]^2)/(3*e^(3/2)*g) - (8*b*(e*f - d*g)*n*Sqrt[f + g*x]*(a + b*Log[c*(d +
 e*x)^n]))/(3*e*g) - (8*b*n*(f + g*x)^(3/2)*(a + b*Log[c*(d + e*x)^n]))/(9*g) + (8*b*(e*f - d*g)^(3/2)*n*ArcTa
nh[(Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g]]*(a + b*Log[c*(d + e*x)^n]))/(3*e^(3/2)*g) + (2*(f + g*x)^(3/2)*(a
+ b*Log[c*(d + e*x)^n])^2)/(3*g) + (16*b^2*(e*f - d*g)^(3/2)*n^2*ArcTanh[(Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*
g]]*Log[2/(1 - (Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g])])/(3*e^(3/2)*g) + (8*b^2*(e*f - d*g)^(3/2)*n^2*PolyLog
[2, 1 - 2/(1 - (Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g])])/(3*e^(3/2)*g)

________________________________________________________________________________________

Rubi [A]  time = 1.50058, antiderivative size = 510, normalized size of antiderivative = 1., number of steps used = 21, number of rules used = 15, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.577, Rules used = {2398, 2411, 2346, 63, 208, 2348, 12, 1587, 6741, 5984, 5918, 2402, 2315, 2319, 50} \[ \frac{8 b^2 n^2 (e f-d g)^{3/2} \text{PolyLog}\left (2,1-\frac{2}{1-\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}}\right )}{3 e^{3/2} g}+\frac{8 b n (e f-d g)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^{3/2} g}-\frac{8 b n (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}-\frac{8 b n \sqrt{f+g x} (e f-d g) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e g}+\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac{8 b^2 n^2 (e f-d g)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )^2}{3 e^{3/2} g}-\frac{64 b^2 n^2 (e f-d g)^{3/2} \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )}{9 e^{3/2} g}+\frac{16 b^2 n^2 (e f-d g)^{3/2} \log \left (\frac{2}{1-\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}}\right ) \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )}{3 e^{3/2} g}+\frac{64 b^2 n^2 \sqrt{f+g x} (e f-d g)}{9 e g}+\frac{16 b^2 n^2 (f+g x)^{3/2}}{27 g} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[f + g*x]*(a + b*Log[c*(d + e*x)^n])^2,x]

[Out]

(64*b^2*(e*f - d*g)*n^2*Sqrt[f + g*x])/(9*e*g) + (16*b^2*n^2*(f + g*x)^(3/2))/(27*g) - (64*b^2*(e*f - d*g)^(3/
2)*n^2*ArcTanh[(Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g]])/(9*e^(3/2)*g) - (8*b^2*(e*f - d*g)^(3/2)*n^2*ArcTanh[
(Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g]]^2)/(3*e^(3/2)*g) - (8*b*(e*f - d*g)*n*Sqrt[f + g*x]*(a + b*Log[c*(d +
 e*x)^n]))/(3*e*g) - (8*b*n*(f + g*x)^(3/2)*(a + b*Log[c*(d + e*x)^n]))/(9*g) + (8*b*(e*f - d*g)^(3/2)*n*ArcTa
nh[(Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g]]*(a + b*Log[c*(d + e*x)^n]))/(3*e^(3/2)*g) + (2*(f + g*x)^(3/2)*(a
+ b*Log[c*(d + e*x)^n])^2)/(3*g) + (16*b^2*(e*f - d*g)^(3/2)*n^2*ArcTanh[(Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*
g]]*Log[2/(1 - (Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g])])/(3*e^(3/2)*g) + (8*b^2*(e*f - d*g)^(3/2)*n^2*PolyLog
[2, 1 - 2/(1 - (Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g])])/(3*e^(3/2)*g)

Rule 2398

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((
f + g*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n])^p)/(g*(q + 1)), x] - Dist[(b*e*n*p)/(g*(q + 1)), Int[((f + g*x)^(q
 + 1)*(a + b*Log[c*(d + e*x)^n])^(p - 1))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*
f - d*g, 0] && GtQ[p, 0] && NeQ[q, -1] && IntegersQ[2*p, 2*q] && ( !IGtQ[q, 0] || (EqQ[p, 2] && NeQ[q, 1]))

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 2346

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[((d
 + e*x)^(q - 1)*(a + b*Log[c*x^n])^p)/x, x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 2348

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_.))/(x_), x_Symbol] :> With[{u = IntHi
de[(d + e*x^r)^q/x, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[Dist[1/x, u, x], x], x]] /; FreeQ[{a, b
, c, d, e, n, r}, x] && IntegerQ[q - 1/2]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1587

Int[(Pp_)/(Qq_), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[(Coeff[Pp, x, p]*Log[RemoveConte
nt[Qq, x]])/(q*Coeff[Qq, x, q]), x] /; EqQ[p, q - 1] && EqQ[Pp, Simplify[(Coeff[Pp, x, p]*D[Qq, x])/(q*Coeff[Q
q, x, q])]]] /; PolyQ[Pp, x] && PolyQ[Qq, x]

Rule 6741

Int[u_, x_Symbol] :> With[{v = NormalizeIntegrand[u, x]}, Int[v, x] /; v =!= u]

Rule 5984

Int[(((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c
*x])^(p + 1)/(b*e*(p + 1)), x] + Dist[1/(c*d), Int[(a + b*ArcTanh[c*x])^p/(1 - c*x), x], x] /; FreeQ[{a, b, c,
 d, e}, x] && EqQ[c^2*d + e, 0] && IGtQ[p, 0]

Rule 5918

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTanh[c*x])^p*
Log[2/(1 + (e*x)/d)])/e, x] + Dist[(b*c*p)/e, Int[((a + b*ArcTanh[c*x])^(p - 1)*Log[2/(1 + (e*x)/d)])/(1 - c^2
*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 - e^2, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2319

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1
)*(a + b*Log[c*x^n])^p)/(e*(q + 1)), x] - Dist[(b*n*p)/(e*(q + 1)), Int[((d + e*x)^(q + 1)*(a + b*Log[c*x^n])^
(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && GtQ[p, 0] && NeQ[q, -1] && (EqQ[p, 1] || (Integers
Q[2*p, 2*q] &&  !IGtQ[q, 0]) || (EqQ[p, 2] && NeQ[q, 1]))

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rubi steps

\begin{align*} \int \sqrt{f+g x} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \, dx &=\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac{(4 b e n) \int \frac{(f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )}{d+e x} \, dx}{3 g}\\ &=\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac{(4 b n) \operatorname{Subst}\left (\int \frac{\left (\frac{e f-d g}{e}+\frac{g x}{e}\right )^{3/2} \left (a+b \log \left (c x^n\right )\right )}{x} \, dx,x,d+e x\right )}{3 g}\\ &=\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac{(4 b n) \operatorname{Subst}\left (\int \sqrt{\frac{e f-d g}{e}+\frac{g x}{e}} \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{3 e}-\frac{(4 b (e f-d g) n) \operatorname{Subst}\left (\int \frac{\sqrt{\frac{e f-d g}{e}+\frac{g x}{e}} \left (a+b \log \left (c x^n\right )\right )}{x} \, dx,x,d+e x\right )}{3 e g}\\ &=-\frac{8 b n (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac{(4 b (e f-d g) n) \operatorname{Subst}\left (\int \frac{a+b \log \left (c x^n\right )}{\sqrt{\frac{e f-d g}{e}+\frac{g x}{e}}} \, dx,x,d+e x\right )}{3 e^2}-\frac{\left (4 b (e f-d g)^2 n\right ) \operatorname{Subst}\left (\int \frac{a+b \log \left (c x^n\right )}{x \sqrt{\frac{e f-d g}{e}+\frac{g x}{e}}} \, dx,x,d+e x\right )}{3 e^2 g}+\frac{\left (8 b^2 n^2\right ) \operatorname{Subst}\left (\int \frac{\left (\frac{e f-d g}{e}+\frac{g x}{e}\right )^{3/2}}{x} \, dx,x,d+e x\right )}{9 g}\\ &=\frac{16 b^2 n^2 (f+g x)^{3/2}}{27 g}-\frac{8 b (e f-d g) n \sqrt{f+g x} \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e g}-\frac{8 b n (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac{8 b (e f-d g)^{3/2} n \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^{3/2} g}+\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}+\frac{\left (8 b^2 (e f-d g) n^2\right ) \operatorname{Subst}\left (\int \frac{\sqrt{\frac{e f-d g}{e}+\frac{g x}{e}}}{x} \, dx,x,d+e x\right )}{9 e g}+\frac{\left (8 b^2 (e f-d g) n^2\right ) \operatorname{Subst}\left (\int \frac{\sqrt{\frac{e f-d g}{e}+\frac{g x}{e}}}{x} \, dx,x,d+e x\right )}{3 e g}+\frac{\left (4 b^2 (e f-d g)^2 n^2\right ) \operatorname{Subst}\left (\int -\frac{2 \sqrt{e} \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f-\frac{d g}{e}+\frac{g x}{e}}}{\sqrt{e f-d g}}\right )}{\sqrt{e f-d g} x} \, dx,x,d+e x\right )}{3 e^2 g}\\ &=\frac{64 b^2 (e f-d g) n^2 \sqrt{f+g x}}{9 e g}+\frac{16 b^2 n^2 (f+g x)^{3/2}}{27 g}-\frac{8 b (e f-d g) n \sqrt{f+g x} \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e g}-\frac{8 b n (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac{8 b (e f-d g)^{3/2} n \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^{3/2} g}+\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac{\left (8 b^2 (e f-d g)^{3/2} n^2\right ) \operatorname{Subst}\left (\int \frac{\tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f-\frac{d g}{e}+\frac{g x}{e}}}{\sqrt{e f-d g}}\right )}{x} \, dx,x,d+e x\right )}{3 e^{3/2} g}+\frac{\left (8 b^2 (e f-d g)^2 n^2\right ) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{\frac{e f-d g}{e}+\frac{g x}{e}}} \, dx,x,d+e x\right )}{9 e^2 g}+\frac{\left (8 b^2 (e f-d g)^2 n^2\right ) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{\frac{e f-d g}{e}+\frac{g x}{e}}} \, dx,x,d+e x\right )}{3 e^2 g}\\ &=\frac{64 b^2 (e f-d g) n^2 \sqrt{f+g x}}{9 e g}+\frac{16 b^2 n^2 (f+g x)^{3/2}}{27 g}-\frac{8 b (e f-d g) n \sqrt{f+g x} \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e g}-\frac{8 b n (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac{8 b (e f-d g)^{3/2} n \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^{3/2} g}+\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac{\left (16 b^2 (e f-d g)^{3/2} n^2\right ) \operatorname{Subst}\left (\int \frac{x \tanh ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{e f-d g}}\right )}{d g+e \left (-f+x^2\right )} \, dx,x,\sqrt{f+g x}\right )}{3 \sqrt{e} g}+\frac{\left (16 b^2 (e f-d g)^2 n^2\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{e f-d g}{g}+\frac{e x^2}{g}} \, dx,x,\sqrt{f+g x}\right )}{9 e g^2}+\frac{\left (16 b^2 (e f-d g)^2 n^2\right ) \operatorname{Subst}\left (\int \frac{1}{-\frac{e f-d g}{g}+\frac{e x^2}{g}} \, dx,x,\sqrt{f+g x}\right )}{3 e g^2}\\ &=\frac{64 b^2 (e f-d g) n^2 \sqrt{f+g x}}{9 e g}+\frac{16 b^2 n^2 (f+g x)^{3/2}}{27 g}-\frac{64 b^2 (e f-d g)^{3/2} n^2 \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )}{9 e^{3/2} g}-\frac{8 b (e f-d g) n \sqrt{f+g x} \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e g}-\frac{8 b n (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac{8 b (e f-d g)^{3/2} n \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^{3/2} g}+\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac{\left (16 b^2 (e f-d g)^{3/2} n^2\right ) \operatorname{Subst}\left (\int \frac{x \tanh ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{e f-d g}}\right )}{-e f+d g+e x^2} \, dx,x,\sqrt{f+g x}\right )}{3 \sqrt{e} g}\\ &=\frac{64 b^2 (e f-d g) n^2 \sqrt{f+g x}}{9 e g}+\frac{16 b^2 n^2 (f+g x)^{3/2}}{27 g}-\frac{64 b^2 (e f-d g)^{3/2} n^2 \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )}{9 e^{3/2} g}-\frac{8 b^2 (e f-d g)^{3/2} n^2 \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )^2}{3 e^{3/2} g}-\frac{8 b (e f-d g) n \sqrt{f+g x} \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e g}-\frac{8 b n (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac{8 b (e f-d g)^{3/2} n \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^{3/2} g}+\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}+\frac{\left (16 b^2 (e f-d g) n^2\right ) \operatorname{Subst}\left (\int \frac{\tanh ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{e f-d g}}\right )}{1-\frac{\sqrt{e} x}{\sqrt{e f-d g}}} \, dx,x,\sqrt{f+g x}\right )}{3 e g}\\ &=\frac{64 b^2 (e f-d g) n^2 \sqrt{f+g x}}{9 e g}+\frac{16 b^2 n^2 (f+g x)^{3/2}}{27 g}-\frac{64 b^2 (e f-d g)^{3/2} n^2 \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )}{9 e^{3/2} g}-\frac{8 b^2 (e f-d g)^{3/2} n^2 \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )^2}{3 e^{3/2} g}-\frac{8 b (e f-d g) n \sqrt{f+g x} \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e g}-\frac{8 b n (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac{8 b (e f-d g)^{3/2} n \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^{3/2} g}+\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}+\frac{16 b^2 (e f-d g)^{3/2} n^2 \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \log \left (\frac{2}{1-\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}}\right )}{3 e^{3/2} g}-\frac{\left (16 b^2 (e f-d g) n^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (\frac{2}{1-\frac{\sqrt{e} x}{\sqrt{e f-d g}}}\right )}{1-\frac{e x^2}{e f-d g}} \, dx,x,\sqrt{f+g x}\right )}{3 e g}\\ &=\frac{64 b^2 (e f-d g) n^2 \sqrt{f+g x}}{9 e g}+\frac{16 b^2 n^2 (f+g x)^{3/2}}{27 g}-\frac{64 b^2 (e f-d g)^{3/2} n^2 \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )}{9 e^{3/2} g}-\frac{8 b^2 (e f-d g)^{3/2} n^2 \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )^2}{3 e^{3/2} g}-\frac{8 b (e f-d g) n \sqrt{f+g x} \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e g}-\frac{8 b n (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac{8 b (e f-d g)^{3/2} n \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^{3/2} g}+\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}+\frac{16 b^2 (e f-d g)^{3/2} n^2 \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \log \left (\frac{2}{1-\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}}\right )}{3 e^{3/2} g}+\frac{\left (16 b^2 (e f-d g)^{3/2} n^2\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1-\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}}\right )}{3 e^{3/2} g}\\ &=\frac{64 b^2 (e f-d g) n^2 \sqrt{f+g x}}{9 e g}+\frac{16 b^2 n^2 (f+g x)^{3/2}}{27 g}-\frac{64 b^2 (e f-d g)^{3/2} n^2 \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )}{9 e^{3/2} g}-\frac{8 b^2 (e f-d g)^{3/2} n^2 \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )^2}{3 e^{3/2} g}-\frac{8 b (e f-d g) n \sqrt{f+g x} \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e g}-\frac{8 b n (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac{8 b (e f-d g)^{3/2} n \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^{3/2} g}+\frac{2 (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}+\frac{16 b^2 (e f-d g)^{3/2} n^2 \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right ) \log \left (\frac{2}{1-\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}}\right )}{3 e^{3/2} g}+\frac{8 b^2 (e f-d g)^{3/2} n^2 \text{Li}_2\left (1-\frac{2}{1-\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}}\right )}{3 e^{3/2} g}\\ \end{align*}

Mathematica [A]  time = 1.09339, size = 643, normalized size = 1.26 \[ \frac{2 \left ((f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2-\frac{b n \left (-9 b n (e f-d g)^{3/2} \left (2 \text{PolyLog}\left (2,\frac{1}{2}-\frac{\sqrt{e} \sqrt{f+g x}}{2 \sqrt{e f-d g}}\right )+\log \left (\sqrt{e f-d g}-\sqrt{e} \sqrt{f+g x}\right ) \left (\log \left (\sqrt{e f-d g}-\sqrt{e} \sqrt{f+g x}\right )+2 \log \left (\frac{1}{2} \left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}+1\right )\right )\right )\right )+9 b n (e f-d g)^{3/2} \left (2 \text{PolyLog}\left (2,\frac{1}{2} \left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}+1\right )\right )+\log \left (\sqrt{e f-d g}+\sqrt{e} \sqrt{f+g x}\right ) \left (\log \left (\sqrt{e f-d g}+\sqrt{e} \sqrt{f+g x}\right )+2 \log \left (\frac{1}{2}-\frac{\sqrt{e} \sqrt{f+g x}}{2 \sqrt{e f-d g}}\right )\right )\right )+12 e^{3/2} (f+g x)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )+18 (e f-d g)^{3/2} \log \left (\sqrt{e f-d g}-\sqrt{e} \sqrt{f+g x}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )-18 (e f-d g)^{3/2} \log \left (\sqrt{e f-d g}+\sqrt{e} \sqrt{f+g x}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )+36 a \sqrt{e} \sqrt{f+g x} (e f-d g)+36 b \sqrt{e} \sqrt{f+g x} (e f-d g) \log \left (c (d+e x)^n\right )-96 b n (e f-d g) \left (\sqrt{e} \sqrt{f+g x}-\sqrt{e f-d g} \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )\right )-8 b e^{3/2} n (f+g x)^{3/2}\right )}{9 e^{3/2}}\right )}{3 g} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[f + g*x]*(a + b*Log[c*(d + e*x)^n])^2,x]

[Out]

(2*((f + g*x)^(3/2)*(a + b*Log[c*(d + e*x)^n])^2 - (b*n*(36*a*Sqrt[e]*(e*f - d*g)*Sqrt[f + g*x] - 8*b*e^(3/2)*
n*(f + g*x)^(3/2) - 96*b*(e*f - d*g)*n*(Sqrt[e]*Sqrt[f + g*x] - Sqrt[e*f - d*g]*ArcTanh[(Sqrt[e]*Sqrt[f + g*x]
)/Sqrt[e*f - d*g]]) + 36*b*Sqrt[e]*(e*f - d*g)*Sqrt[f + g*x]*Log[c*(d + e*x)^n] + 12*e^(3/2)*(f + g*x)^(3/2)*(
a + b*Log[c*(d + e*x)^n]) + 18*(e*f - d*g)^(3/2)*(a + b*Log[c*(d + e*x)^n])*Log[Sqrt[e*f - d*g] - Sqrt[e]*Sqrt
[f + g*x]] - 18*(e*f - d*g)^(3/2)*(a + b*Log[c*(d + e*x)^n])*Log[Sqrt[e*f - d*g] + Sqrt[e]*Sqrt[f + g*x]] - 9*
b*(e*f - d*g)^(3/2)*n*(Log[Sqrt[e*f - d*g] - Sqrt[e]*Sqrt[f + g*x]]*(Log[Sqrt[e*f - d*g] - Sqrt[e]*Sqrt[f + g*
x]] + 2*Log[(1 + (Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g])/2]) + 2*PolyLog[2, 1/2 - (Sqrt[e]*Sqrt[f + g*x])/(2*
Sqrt[e*f - d*g])]) + 9*b*(e*f - d*g)^(3/2)*n*(Log[Sqrt[e*f - d*g] + Sqrt[e]*Sqrt[f + g*x]]*(Log[Sqrt[e*f - d*g
] + Sqrt[e]*Sqrt[f + g*x]] + 2*Log[1/2 - (Sqrt[e]*Sqrt[f + g*x])/(2*Sqrt[e*f - d*g])]) + 2*PolyLog[2, (1 + (Sq
rt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g])/2])))/(9*e^(3/2))))/(3*g)

________________________________________________________________________________________

Maple [F]  time = 1.007, size = 0, normalized size = 0. \begin{align*} \int \sqrt{gx+f} \left ( a+b\ln \left ( c \left ( ex+d \right ) ^{n} \right ) \right ) ^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)^(1/2)*(a+b*ln(c*(e*x+d)^n))^2,x)

[Out]

int((g*x+f)^(1/2)*(a+b*ln(c*(e*x+d)^n))^2,x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^(1/2)*(a+b*log(c*(e*x+d)^n))^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\sqrt{g x + f} b^{2} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + 2 \, \sqrt{g x + f} a b \log \left ({\left (e x + d\right )}^{n} c\right ) + \sqrt{g x + f} a^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^(1/2)*(a+b*log(c*(e*x+d)^n))^2,x, algorithm="fricas")

[Out]

integral(sqrt(g*x + f)*b^2*log((e*x + d)^n*c)^2 + 2*sqrt(g*x + f)*a*b*log((e*x + d)^n*c) + sqrt(g*x + f)*a^2,
x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)**(1/2)*(a+b*ln(c*(e*x+d)**n))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{g x + f}{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^(1/2)*(a+b*log(c*(e*x+d)^n))^2,x, algorithm="giac")

[Out]

integrate(sqrt(g*x + f)*(b*log((e*x + d)^n*c) + a)^2, x)